from google.appengine.ext import db
from geo.geomodel import GeoModel

class Rental(GeoModel):
  """A rental unit listed

  Including address, date_listed, rent, and other data such as # of bedrooms and baths
  """
  external_id = db.StringProperty()
  address = db.PostalAddressProperty()
  rent = db.FloatProperty()
  bedrooms = db.IntegerProperty()
  date_listed = db.DateTimeProperty(auto_now_add=True)
  date_updated = db.DateTimeProperty(auto_now=True)

  #@staticmethod
  ##def get_property_list_around_point(user):
    #"""Returns the task lists that the given user has access to."""
    #if not user: return []


